#include <iostream>
#include <string>
using namespace std;


class car
{
    private:
        string name;
        string color;
        string type;
        float price;
        float height;
        float weight;

    public:
        car() : name("nihao") ,color("red"),type("mini"),price(10),height(1.5),weight(1.4) {}
        
        car(string name) : name(name) ,color("red"),type("mini"),price(10),height(1.5),weight(1.4) {}

        car(const car &ca){
            this->name=ca.name;
            this->color=ca.color;
            this->type=ca.type;
            this->price=ca.price;
            this->height=ca.height;
            this->weight=ca.weight;
        }

        ~car() {}

        
    
        void setname(string name){this->name=name;}
        string getname()const { return name;}

        void setcolor (string color){this->color=color;}
        string getcolor()const {return color;}

        void settype(string type){this->type=type;}
        string gettype()const { return type;}

        void setprice(float price){this->price=price;}
        float getprice()const { return price;}

        void setheight(float height){this->height=height;}
        float getheight()const { return height;}

        void setweight(float weight){this->weight=weight;}
        float getweight()const { return weight;}

        void print(){cout<<"name:"<<name<<endl;
        cout<<"color:"<<color<<endl;
        cout<<"type:"<<type<<endl;
        cout<<"price:"<<price<<"(万元)"<<endl;
        cout<<"height:"<<height<<"(cm)"<<endl;
        cout<<"weight:"<<weight<<"(t)"<<endl;
        
        }
                         
};
int main()
{
    car ca;    
    car ca1("hello");
    car ca2=ca1;
    cout<<"ca的数据成员"<<endl;
    ca.print();
    cout<<"ca1的数据成员"<<endl;
    ca1.print();
    cout<<"ca2的数据成员"<<endl;
    ca2.print();
}